import java.util.*;

public class test {
    public int[] twoSum(int[] nums, int target) {
        int[] tar = new int[2];
        for(int i = 0; i < nums.length;i++) {
            for (int j = i + 1; j < nums.length; j++) {
                if( nums[i] + nums[j] == target) {
                    tar[0] = i;
                    tar[1] = j;
                }
            }
        }

        return tar;
    }
    public int[] twoSum2(int[] nums, int target) {
        HashMap<Integer,Integer > map = new HashMap<>();
        for (int i = 0; i < nums.length; i++) {
            if (map.containsKey(target-nums[i])) {
                return new int[]{map.get(target-nums[i]),i};
            }
        }

        return new int[0];
    }


    public static void main(String[] args) {
//        LinkedList<Integer> l1 = new LinkedList<>();
//        LinkedList<Integer> l2 = new LinkedList<>();
//
//        l1.add(1);
//        l1.add(2);
//        l2.add(3);
//        l2.add(4);
//        System.out.println(ad3.0dTwoNumbers(l1,l2));
        System.out.println((10.0)/3);
        int[] arr = new int[2];

    }
    public static LinkedList addTwoNumbers(LinkedList l1, LinkedList l2) {
        LinkedList<Integer> ret = new LinkedList<Integer>();
        String a = new String();
        String b = new String();
        for(int i = 0; i < l1.size();i++) {
            a = a + l1.poll();
        }
        for(int i = 0 ;i < l2.size();i++) {
            b = b + l2.poll();
        }
        int sum = Integer.parseInt(a) + Integer.parseInt(b);
        String c = String.valueOf(sum);
        for(int i = c.length() - 1 ;i > 0;i--) {
            ret.add(Integer.valueOf(c.substring(i,i - 1)));
        }
        return ret;

    }
    public int lengthOfLongestSubstring(String s) {
        if(s.length() == 0) return 0;
        HashMap<Character,Integer> map = new HashMap<Character,Integer>();
        int max = 0;
        int left = 0;
        for(int i = 0 ; i < s.length();i++) {
            if(map.containsKey(s.charAt(i))) {

                left = Math.max(left,map.get(s.charAt(i)) + 1);
            }
            map.put(s.charAt(i),i);
            max = Math.max(max,i-left+1);
        }
        return max;

    }
    public double findMedianSortedArrays(int[] nums1, int[] nums2) {

            int[] arr = new int[nums1.length + nums2.length];
            for (int i = 0; i < arr.length; i++) {
                if(i < nums1.length) {
                    arr[i] = nums1[i];
                } else {
                    arr[i] = nums2[i - nums1.length ];
                }
            }
            Arrays.sort(arr);
            if(arr.length != 0 && arr.length % 2 ==0) {
                return (double) ((arr[arr.length / 2 - 1] + arr[arr.length/2])/2.0);
            } else if(arr.length != 0 && arr.length %2 == 1) {
                return (double) arr[arr.length/2 ];
            } else {
                return 0;
            }




    }

}
